#include"mr_mem.h"
#include <iostream>
#include <unistd.h>
#include <libmemcached/memcached.h>
#include <mysql.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include   <string.h>
using namespace std;



 int main(int argc,char *argv[])
  {
      //connect server
     struct passwdsend p;
     struct spwdsend sp;
     strcpy(p.pw_name,"mengrui");
     p.pw_uid=501;

     //sprintf(p->pw_uid,"ld",501);
     strcpy(p.pw_passwd,"x");
     p.pw_gid=1001;
     struct RequInfo Req, Req1;
     strcpy(Req.RequInfo,"User");
     strcpy(Req.Param,"mengrui");
     strcpy(Req.Machname,"stu-Lenovo");
     mr_memsetp(Req,&p);
     memset(&p,0x00,sizeof(p));
     mr_memgetp(Req,&p);
    strcpy(Req1.RequInfo,"SHADOW");
     strcpy(Req1.Param,"gonghua");
      strcpy(Req1.Machname,"server1");
    strcpy(sp.sp_namp,"gonghua");

    strcpy(sp.sp_pwdp,"gh");
    mr_memsetsp(Req1,&sp);
    memset(&p,0x00,sizeof(p));
    mr_memgetsp(Req1,&sp);
     return 0;
 }


